Enable Wemo option for subscriptions across subnets#75412
Conversation
|
Hey there @esev, mind taking a look at this pull request as it has been labeled with an integration ( |
| { | ||
| DOMAIN: vol.Schema( | ||
| { | ||
| vol.Optional(CONF_CALLBACK_ADDRESS): cv.string, |
There was a problem hiding this comment.
Shouldn't this be provided by the Network integration instead?
Additionally:
For integrations that connect to devices or services, we no longer accept new YAML configuration or changes.
This integration needs to be refactored first to use a configuration flow and config entries first.
More information about this can be found in Architecture Decision Record:
See our developer documentation on how to get started creating a configuration flow for this integration:
https://developers.home-assistant.io/docs/config_entries_config_flow_handler
As these changes often involve a bit of work and some significant shift in the current code, we will close this PR for now.
We (and our community!) would really appreciate it if you could start on the refactoring of this integration in a new PR.
Thanks already! 👍
There was a problem hiding this comment.
I don't see how this would go in the Network integration... it configures a pywemo-specific environment variable. Anyway, will rework after config flow is done. Beyond my current capabilities.
|
Hi @frenck, could you provide feedback on #56972? I know I need to fix the merge conflict, but is the approach okay? I've previously been told that integrations should not use a config entry per device. So that's why I went the route I did for #56972, making it a global config for the integration. TBH, I have no idea how to replicate the static config without having a config entry per device. |
That is not related to this PR? I'm confused?
Depends on who you ask and the use case. Some integrations benefit from using a per device approach. A good example is LIFX for which is a PR open right now to migrate to a per device based approach because of similar issues I guess 🤷 |
|
Thank you! It's not directly related, but if the approach is okay Edit: frenck said it should go in the Network integration instead. So definitely not related. |
Proposed change
Enables setting a "callback_address" (advanced option) in the Wemo integration to enable subscriptions when HA and the Wemo switches are on different subnets. Eliminates a recurring error message, and allows for instantanous updates when a Wemo device is operated physically or through the Wemo mobile app.
Type of change
Additional information
PYWEMO_CALLBACK_ADDRESS was recently enabled in pywemo to address this issue. This PR simply exposes a way to set this environment variable from HA.
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: